package net.sangpil.applications.project.superw
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.geom.Point;
	
	import net.sangpil.applications.project.superw.info.M_KEY;
	import net.sangpil.externals.google.superw.superw_map;

	public class Map_service extends Sprite
	{
		private var mkey:M_KEY;
		private var map:superw_map;
		public function Map_service(googleMapKey:String, phpGatewayPath:String)
		{
			super();
			//make key.
			M_KEY.GOOGLE_MAP_KEY = googleMapKey;
			M_KEY.PHP_GATEWAY_PATH = phpGatewayPath;
			
			addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void
		{
			mkey = new M_KEY();
			mkey.map_size = new Point(stage.stageWidth, stage.stageHeight);
			
			map = new superw_map(mkey);
			
			this.setLayout();
			this.setEvent();
		}
		
		
		/* default */
		private function setLayout():void
		{
			addChild(map);
		}
		
		private function setEvent():void
		{
			
		}
		
		/* functions. */
	}
}